package com.ybkj.daijia.server.mc;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ybkj.daijia.server.model.Area;
import java.io.Serializable;
import java.math.BigDecimal;
import org.apache.commons.lang3.StringUtils;

/**
 * 乘客
 *
 * @author Administrator
 */
public class Passenger implements Serializable {

    /**
     * Andriod设备
     */
    public static final String DEVICE_ANDROID = "ANDROID";
    /**
     * iOS设备
     */
    public static final String DEVICE_IOS = "IOS";

    /**
     * 个人
     */
    public static final Integer TYPE_PASSENGER = 0;

    /**
     * 企业
     */
    public static final Integer TYPE_ENTERPRISE = 1;

    /**
     * 客户推荐
     */
    public static final Integer INTRODUCE_TYPE_PASSENGER = 0;
    /**
     * 司机推荐
     */
    public static final Integer INTRODUCE_TYPE_DRIVER = 1;


    public static final String PASSENGER_CHANNEL_PHONE = "电话预约";
    public static final String PASSENGER_CHANNEL_APP = "APP预约";
    public static final String PASSENGER_CHANNEL_WEIXIN = "微信预约";
    public static final String PASSENGER_CHANNEL_WEB = "网站预约";
    public static final String PASSENGER_CHANNEL_BUDAN = "司机补单";
    public static final String PASSENGER_CHANNEL_INVITE = "推荐";
    public static final String PASSENGER_CHANNEL_MANAGER = "客户经理";
    public static final String PASSENGER_CHANNEL_ACTIVITY = "活动推广";
    private static final long serialVersionUID = 1L;
    private Long id;
    private String name;  //乘客姓名
    private String phone;    //乘客电话
    private boolean allowOverdraw;//是否允许签单
    private BigDecimal drawMoney;  //可提现金额
    private BigDecimal nodrawMoney; //不可提现金额
    private BigDecimal frozenMoney;  //冻结金额
    private BigDecimal receiptMoney;//可开票金额
    private Long enterprise_id; //所属企业Id
    private String enterprise_name;//所属企业名称
    private String plateNumber;  //车牌号
    private String photo;    //头像地址
    private Long grade_id;    //级别Id
    private String grade_name;  //级别名称
    private boolean inBlackList;//是否为黑名单乘客
    private Integer type;    //类型:0个人,1企业
    private String idcard;    //身份证号码
    private Integer gender;    //性别
    private String email;    //邮箱
    private String memo;    //备注
    private Double latitude;  //纬度
    private Double longitude;  //经度
    private String address;    //简单地址:如(翰林世家)
    private String created;    //注册时间
    private String updated;
    private Integer version;  //操作版本
    private Long channel_id;  //渠道Id
    private String channel_name;//渠道名称
    private String appKey;    //用于区别系统
    private Long companyId;    //所属公司Id
    private String companyName; //所属公司名称
    private String introducer;  //推荐人
    private Integer introduceType;//推荐人类型：0客户,1司机
    private Double mileage;//行驶里程(公里)
    private Long areaDaijiaId;
    private Area areaDaijia;
    @JsonIgnore
    private Long areaZhuancheId;
    @JsonIgnore
    private Area areaZhuanche;
    private Long areaPaotuiId;
    private Area areaPaotui;
    @JsonIgnore
    private Long drivingNumberTimes;
    @JsonIgnore
    private String cid;
    @JsonIgnore
    private String deviceType;
    @JsonIgnore
    private String appVersion;
    @JsonIgnore
    private BigDecimal advance;//预存款
    @JsonIgnore
    private String memberEcn;
    @JsonIgnore
    private String memberEcp;
    //是否进行实名认证.
    private Integer examine;
    private String phoneShow;//隐藏电话显示字段
    private boolean isUpPlatformInfo;//是否向监管平台上传信息
    private Integer upStatus;//客户上传标识
    private String password;//登录密码
    private Integer reward;//是否能够获取一次性奖励
    private String idCardPhoto;//身份证照片
    private String idCardBackPhoto;//身份证背面照片
    private String wxHeadImgUrl;
    private String wxNickName;

    public String getIdCardPhoto() {
        return this.idCardPhoto;
    }

    public void setIdCardPhoto(String idCardPhoto) {
        this.idCardPhoto = idCardPhoto;
    }

    public String getIdCardBackPhoto() {
        return this.idCardBackPhoto;
    }

    public void setIdCardBackPhoto(String idCardBackPhoto) {
        this.idCardBackPhoto = idCardBackPhoto;
    }

    public Integer getUpStatus() {
        return upStatus;
    }

    public void setUpStatus(Integer upStatus) {
        this.upStatus = upStatus;
    }

    public boolean isUpPlatformInfo() {
        return isUpPlatformInfo;
    }

    public void setUpPlatformInfo(boolean isUpPlatformInfo) {
        this.isUpPlatformInfo = isUpPlatformInfo;
    }

    public String getPhoneShow() {
        return phoneShow;
    }

    public void setPhoneShow(String phoneShow) {
        this.phoneShow = phoneShow;
    }

    public Integer getExamine() {
        return examine;
    }

    public void setExamine(Integer examine) {
        this.examine = examine;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }


    public Long getEnterprise_id() {
        return enterprise_id;
    }

    public void setEnterprise_id(Long enterprise_id) {
        this.enterprise_id = enterprise_id;
    }

    public String getEnterprise_name() {
        return enterprise_name;
    }

    public void setEnterprise_name(String enterprise_name) {
        this.enterprise_name = enterprise_name == null ? null : enterprise_name.trim();
    }

    public String getPlateNumber() {
        return plateNumber;
    }

    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber == null ? null : plateNumber.trim();
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo == null ? null : photo.trim();
    }

    public Long getGrade_id() {
        return grade_id;
    }

    public void setGrade_id(Long grade_id) {
        this.grade_id = grade_id;
    }

    public String getGrade_name() {
        if (null == grade_name) {
            return "";
        }
        return grade_name;
    }

    public void setGrade_name(String grade_name) {
        this.grade_name = grade_name == null ? null : grade_name.trim();
    }

    public boolean isAllowOverdraw() {
        return allowOverdraw;
    }

    public void setAllowOverdraw(boolean allowOverdraw) {
        this.allowOverdraw = allowOverdraw;
    }

    public boolean isInBlackList() {
        return inBlackList;
    }

    public void setInBlackList(boolean inBlackList) {
        this.inBlackList = inBlackList;
    }

    public Integer getType() {
        if (null == type) {
            return Passenger.TYPE_PASSENGER;
        }
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeStr() {
        if (null != type) {
            if (type == 0) {
                return "个人客户";
            } else if (type == 1) {
                return "企业客户";
            }
        }
        return "";
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard == null ? null : idcard.trim();
    }

    public Integer getGender() {
        if (null == gender) {
            return 0;
        }
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo == null ? null : memo.trim();
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getCreated() {
        return created;
    }

    public void setCreated(String created) {
        this.created = created;
    }

    public String getUpdated() {
        return updated;
    }

    public void setUpdated(String updated) {
        this.updated = updated;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Long getChannel_id() {
        return channel_id;
    }

    public void setChannel_id(Long channel_id) {
        this.channel_id = channel_id;
    }

    public String getChannel_name() {
        if (StringUtils.isBlank(channel_name)) {
            return "未知";
        }
        return channel_name;
    }

    public void setChannel_name(String channel_name) {
        this.channel_name = channel_name == null ? null : channel_name.trim();
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey == null ? null : appKey.trim();
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public String getIntroducer() {
        return introducer;
    }

    public void setIntroducer(String introducer) {
        this.introducer = introducer == null ? null : introducer.trim();
    }

    public Integer getIntroduceType() {
        return introduceType;
    }

    public void setIntroduceType(Integer introduceType) {
        this.introduceType = introduceType;
    }

    public Long getAreaDaijiaId() {
        return areaDaijiaId;
    }

    public void setAreaDaijiaId(Long areaDaijiaId) {
        this.areaDaijiaId = areaDaijiaId;
    }

    public Area getAreaDaijia() {
        return areaDaijia;
    }

    public void setAreaDaijia(Area areaDaijia) {
        this.areaDaijia = areaDaijia;
    }

    public Long getAreaZhuancheId() {
        return areaZhuancheId;
    }

    public void setAreaZhuancheId(Long areaZhuancheId) {
        this.areaZhuancheId = areaZhuancheId;
    }

    public Area getAreaZhuanche() {
        return areaZhuanche;
    }

    public void setAreaZhuanche(Area areaZhuanche) {
        this.areaZhuanche = areaZhuanche;
    }

    public Long getDrivingNumberTimes() {
        if (null == drivingNumberTimes) {
            return 0L;
        }
        return drivingNumberTimes;
    }

    public void setDrivingNumberTimes(Long drivingNumberTimes) {
        this.drivingNumberTimes = drivingNumberTimes;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getAppVersion() {
        return appVersion;
    }

    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }

    public Double getMileage() {
        if (null == mileage) {
            return 0D;
        }
        return mileage;
    }

    public void setMileage(Double mileage) {
        this.mileage = mileage;
    }

    public BigDecimal getDrawMoney() {
        if (null != drawMoney) {
            return drawMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
        }
        if (null == drawMoney) {
            return BigDecimal.ZERO;
        }
        return drawMoney;
    }

    public void setDrawMoney(BigDecimal drawMoney) {
        this.drawMoney = drawMoney;
    }

    public BigDecimal getNodrawMoney() {
        if (null != nodrawMoney) {
            return nodrawMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
        }
        if (null == nodrawMoney) {
            return BigDecimal.ZERO;
        }
        return nodrawMoney;
    }

    public void setNodrawMoney(BigDecimal nodrawMoney) {
        this.nodrawMoney = nodrawMoney;
    }

    public BigDecimal getFrozenMoney() {
        return frozenMoney;
    }

    public void setFrozenMoney(BigDecimal frozenMoney) {
        this.frozenMoney = frozenMoney;
    }

    public BigDecimal getReceiptMoney() {
        return receiptMoney;
    }

    public void setReceiptMoney(BigDecimal receiptMoney) {
        this.receiptMoney = receiptMoney;
    }

    public BigDecimal getAdvance() {
        return advance;
    }

    public void setAdvance(BigDecimal advance) {
        this.advance = advance;
    }

    public Long getAreaPaotuiId() {
        return areaPaotuiId;
    }

    public void setAreaPaotuiId(Long areaPaotuiId) {
        this.areaPaotuiId = areaPaotuiId;
    }

    public Area getAreaPaotui() {
        return areaPaotui;
    }

    public void setAreaPaotui(Area areaPaotui) {
        this.areaPaotui = areaPaotui;
    }

    public String getMemberEcn() {
        return memberEcn;
    }

    public void setMemberEcn(String memberEcn) {
        this.memberEcn = memberEcn;
    }

    public String getMemberEcp() {
        return memberEcp;
    }

    public void setMemberEcp(String memberEcp) {
        this.memberEcp = memberEcp;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getReward() {
        return reward;
    }

    public void setReward(Integer reward) {
        this.reward = reward;
    }

    public String getWxHeadImgUrl() {
        return wxHeadImgUrl;
    }

    public void setWxHeadImgUrl(String wxHeadImgUrl) {
        this.wxHeadImgUrl = wxHeadImgUrl;
    }

    public String getWxNickName() {
        return wxNickName;
    }

    public void setWxNickName(String wxNickName) {
        this.wxNickName = wxNickName;
    }
}